package com.lq.educationsystem.teacher.feign;

import com.lq.educationsystem.common.entiy.ClassesStudentTb;
import com.lq.educationsystem.common.entiy.ClassesSubjectTb;
import com.lq.educationsystem.common.entiy.ClassesTb;
import com.lq.educationsystem.common.util.Result;
import com.lq.educationsystem.common.util.ResultPage;
import com.lq.educationsystem.common.vo.ClassesStudentPageVo;
import com.lq.educationsystem.common.vo.ClassesSubjectPageVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Component
@FeignClient(name = "lq-classes" ,
      url = "http://localhost:7000/"
)
public interface ClassesFeign {
//增加


   /**
    * 通过学生id查询信息
    */
   @RequestMapping("/classes/student/base/qclassesbystuentdid")
   public Result<ClassesStudentTb> queryClassesInfoByStudentId (@RequestBody ClassesStudentTb classesStudentInfo );
   /**
    * 通过班级信息查询数据
    * @param classesStudentPageVo
    * @return
    */
   @RequestMapping("/classes/student/base/qclassesstudentinfobystudentid")
   public ResultPage<ClassesStudentTb> queryBatchClassesStudentInfoByStudentId(@RequestBody ClassesStudentPageVo classesStudentPageVo);

   //查询班级课程
   @RequestMapping("/classes/subject/base/query/subject")
   public ResultPage<ClassesSubjectTb> querySubjectInfoListByClassesId(@RequestBody ClassesSubjectPageVo classesSubjectPageVo);


   //通过teacher_subject_id查询信息

   @RequestMapping("/classes/subject/base/query/teacher/subject")
   public ResultPage<ClassesSubjectTb> queryClassesSubjectInfoByTeacherSubjectId(@RequestBody List<Integer> teacherSubjectIdList);

   /**
    * 批量查询班级信息
    */

   @RequestMapping("/classes/base/query/batch/classes")
   public ResultPage<ClassesTb> queryClassesInfoByClassesId(@RequestBody List<Integer> classesIdList);


   //通过班级id查询
   @RequestMapping("/classes/base/querybyid")
   public Result<ClassesTb> queryClassesById(@RequestBody ClassesTb classesInfo);

   /**
    * +
    * 通过班级id查询班级内的学生id
    *
    * @param classesStudentPageVo
    * @return
    */
   @RequestMapping("/classes/student/base/query/classes/student")
   public ResultPage<ClassesStudentTb> queryClassesStudentInfoListByClassesId(@RequestBody ClassesStudentPageVo classesStudentPageVo);
}
